package cn.edu.scau.cmi.wuyihan.exercise11.Example11_5;

import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JTextField;

public class WindowActionEvent extends JFrame{
	JTextField textField;
	ReaderListen listener;
	public WindowActionEvent() {
		init();
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	void init() {
		setLayout(new FlowLayout());
		textField =new JTextField(10);
		listener=new ReaderListen();
		textField.addActionListener(listener);
		add(textField);
	}
}
